-----------------------------------
-- Area: Western Adoulin
-- NPC: Coltrone
-- Type: Patrol NPC
-- @zone 256
-- @pos -30.037 18.517 97.888
-----------------------------------
package.loaded["scripts/zones/Western_Adoulin/TextIDs"] = nil;
-----------------------------------

require("scripts/globals/settings");
require("scripts/zones/Western_Adoulin/TextIDs");
require("scripts/globals/pathfind");

-----------------------------------

local path = {
     34.286797,32.000000,97.887970,
     33.182823,32.000000,97.887939,
     15.326869,32.000000,97.887917,
     10.247829,31.589869,97.887932,
     9.172510,31.348993,97.887924,
     8.086248,31.109510,97.887947,
     3.675982,30.127470,97.887924,
     2.670545,29.904095,97.887939,
     1.632304,29.673313,97.887856,
     0.464032,29.413752,97.887947,
     -1.059663,28.928991,97.887901,
     -8.834453,26.337849,97.887947,
     -10.476743,25.790001,97.887932,
     -11.511524,25.444981,97.887955,
     -16.790291,23.689610,97.887947,
     -17.808365,23.346090,97.887947,
     -19.410042,22.812183,97.887947,
     -20.524509,22.444885,97.887970,
     -22.609594,21.749844,97.887947,
     -23.823816,21.340818,97.887924,
     -24.831247,21.009291,97.887924,
     -30.248556,19.199244,97.887932,
     -31.264338,18.860640,97.887917,
     -32.274067,18.524073,97.887947,
     -41.576523,16.000000,97.887985,
     -42.075615,16.000000,96.993774,
     -42.157635,16.000000,95.984436,
     -42.174484,16.000000,94.975922,
     -42.178967,16.000000,75.608597,
     -42.178978,16.000000,97.284073,
     -41.283436,16.000000,97.784019,
     -40.278862,16.000000,97.866653,
     -39.275871,16.188807,97.883156,
     -9.257230,26.195175,97.887749,
     20.751547,32.000000,97.887955
};

-----------------------------------
-- onSpawn Action
-----------------------------------

function onSpawn(npc)
	npc:initNpcAi();
	npc:setPos(pathfind.first(path));
	onPath(npc);
end;

-----------------------------------
-- onPath Action
-----------------------------------

function onPath(npc)
	pathfind.patrol(npc, path);
end;

-----------------------------------
-- onTrade Action
-----------------------------------

function onTrade(player,npc,trade)
end;

-----------------------------------
-- onTrigger Action
-----------------------------------

function onTrigger(player,npc)
player:startEvent(0x022B);
end;

-----------------------------------
-- onEventUpdate
-----------------------------------

function onEventUpdate(player,csid,option)
	-- printf("CSID: %u",csid);
	-- printf("RESULT: %u",option);
end;

-----------------------------------
-- onEventFinish
-----------------------------------

function onEventFinish(player,csid,option)
	-- printf("CSID: %u",csid);
	-- printf("RESULT: %u",option);
end;